<%
## Tangent, an online sign-up sheet
## Copyright (C) 2008 Justin Ludwig and Adam Stuenkel
## 
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License
## as published by the Free Software Foundation; either version 2
## of the License, or (at your option) any later version.
## 
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
## 
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301, USA.
-%>

<% @page_title = "People" %>

<h1>People</h1>

<table class="tbl">
<thead>
  <tr>
    <th><%= link_to_order_by "Email", "email" %></th>
    <th><%= link_to_order_by "Display name", "display_name" %></th>
    <th><%= link_to_order_by "State", "state" %></th>
	<th class="tools">&nbsp;</th>
  </tr>
</thead>
<tbody>
<% for person in @people %>
  <tr class="<%= cycle("", "alt") -%>">
    <td><%= link_to h(person.email), person %></td>
    <td><%= link_to h(person.display_name), person %></td>
    <td><%=h person.state %></td>
    <td class="tools">
      <%= link_to titled_image_tag("silk/page_edit.png", :alt => "Edit"), edit_person_path(person) %>
	  <%= link_to_delete person %>
	</td>
  </tr>
<% end %>
</tbody>
</table>
<%= links_to_page @people %>

<div class="buttons">
<%= styled_button_to 'Create', new_person_path, :method => "get", :style => "width:6em;" %>
</div>
